﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    

    @Styles.Render("~/Content/skin/dynatree")
    
    @Html.Partial("_theme")
    
    @Styles.Render("~/Content/css")

</head>
    <body>

        @Html.Partial("_menu")
        
        @RenderBody()

        @Scripts.Render("~/bundles/js")
        
        
        @RenderSection("scripts", required: false)

        <script>
            $(function () {
                menu.run();
                
                $('.grid-view-container button.add').button({
                    icons: {
                        primary: "ui-icon-plusthick"
                    },
                    text: false
                });

                $('.grid-view-container button.refresh').button({
                    icons: {
                        primary: "ui-icon-refresh"
                    },
                    text: false
                });

                $('button:not([role="button"])').button();
            });


            var lastHeight = $(window).height();
            var lastWidth = $(window).width();

            var i = 0;

            $(window).on('resize', function () {
                var currentHeight = $(window).height();
                var currentWidth = $(window).width();

              if ((currentHeight != lastHeight) || (currentWidth != lastWidth)) {
                    lastHeight = currentHeight;
                    lastWidth = currentWidth;

                    $('div.splitter').each(function (index, element) {
                        setTimeout(function () {
                            $(element).trigger('resize');
                        }, 5);

                    });
                    
                }
            });
        </script>

        
    </body>
</html>
